home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / June 96 / Re Scripting.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.3 KB  |  [TEXT/ttxt]

  1. Subject:     Re:Scripting
  2. Sent:        6/28/96 3:10 PM
  3. Received:    6/28/96 3:21 PM
  4. From:        Stephane SILVESTRE, jipe@imaginet.fr
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >For the Script Editor to compile a script against your dictionary, you
  9. must
  10. >have an instance of your part up and running. You must specify the running
  11. >part in the "tell" block of the script.
  12. >
  13. >For example, if your part editor is called SurfWriter, create a new
  14. >document called "SurfWriter Sample". Save the document and reopen it. This
  15. >is necessary because the first time you create a document, the name of the
  16. >document is out of synch its process name. With your document open, type:
  17. >
  18. >tell application "SurfWriter Sample"
  19. >        ...
  20. >end tell
  21. >
  22. >When you double-click your document to open it, a small application called
  23. >the OpenDoc Launcher actually launches and then sub-launches your
  24. document.
  25. >Make sure you wait for the OpenDoc Launcher to quit before attempting to
  26. >compile your script. If you don't wait, your script will be compiled
  27. >against the launcher, instead of against your part.
  28.  
  29. It's exactly what I have done and I always get a syntax error "expected
  30. class name but got identifier".
  31.  
  32. Stephane.
  33.